library(kernlab)
library(HH)
data(musk)
X<-as.matrix(musk[,1:166])
Y<-as.numeric(musk[,167])
Y[Y==1]<-0
Y[Y==2]<-1
n<-length(Y)
v<-apply(X,2,sd)
m<-apply(X,2,mean)
X<-t(apply(t(apply(X,1,"-",m)),1,"/",v))

X<-cbind(1,X)
X<-X[,-order(vif(lm(Y~X)),decreasing=TRUE)[1:87]]
p<-dim(X)[2]

